const { VITE_HIDE_HOME } = import.meta.env;
const Layout = () => import("@/layout/index.vue");

export default [
  {
    path: "/",
    name: "Home",
    component: Layout,
    redirect: "/welcome",
    meta: {
      icon: "ep:home-filled",
      title: "首页",
      rank: 0
    },
    children: [
      {
        path: "/welcome",
        name: "Welcome",
        component: () => import("@/views/welcome/index.vue"),
        meta: {
          title: "首页",
          showLink: VITE_HIDE_HOME === "true" ? false : true
        }
      }
    ]
  },
  {
    path: "/",
    name: "Admin",
    component: Layout,
    redirect: "/admin/profile.vue",
    meta: {
      title: "个人中心",
      showLink: false
    },
    children: [
      {
        path: "/admin/profile",
        name: "AdminProfile",
        component: () => import("@/views/admin/profile.vue"),
        meta: {
          title: "个人资料",
          showLink: false
        }
      },
      {
        path: "/admin/password",
        name: "AdminPassword",
        component: () => import("@/views/admin/password.vue"),
        meta: {
          title: "修改密码",
          showLink: false
        }
      }
    ]
  }
] satisfies Array<RouteConfigsTable>;
